<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<script>
	var c;//声明变量未赋值，打印undefined
		function Student(name,subject,score){
			this.name=name;
			this.subject=subject;
			this.score=score;
			this.printScore=function(){
				console.log(this.name,this.subject,this.score);
			}

		}
		var p1=new Student("zs","数学",80);
		var p2=new Student("liz","语文",90);
		p1.printScore();
		p2.printScore();
		console.log(c);
	</script>
</body>
</html>